//http://api.flickr.com/services/feeds/photos_public.gne?tags=sunset&format=rss_200
function jsonFlickrFeed(feed){
  for (x=0; x<feed.items.length; x++) {
     document.writeln(feed.items[x].title + '-' + feed.items[x].link + '<BR>');
  }
}

function startup() {
   var headID = document.getElementsByTagName("head")[0];         
   var newScript = document.createElement('script');
   newScript.type = 'text/javascript';
   newScript.src = 'http://api.flickr.com/services/feeds/photos_public.gne?tags=sunset&format=json';
   headID.appendChild(newScript);  
}





/*
function jsonFlickrFeed(feed){
  z='';
  for (x=0; x<feed.items.length; x++) {
     tmp=feed.items[x].media.m;
     tmp=tmp.replace(/_m\.jpg/g,'_s.jpg');
     z+='<img src="'+tmp+'" alt="some img" width="75px" height="75px" style="margin: 2px;">';
  }
  document.getElementById('pics').style.display='block';
  document.getElementById('pics').innerHTML=z;
}
function searchFlickr() {
   var headID = document.getElementsByTagName("head")[0];         
   var newScript = document.createElement('script');
   tagID = escape(document.getElementById('tags').value);
   document.getElementById('tags').value='';
   newScript.type = 'text/javascript';
   newScript.src = 'http://flickr.com/services/feeds/photos_public.gne?tags=' + tagID + '&format=json';
   headID.appendChild(newScript);
   document.getElementById('pics').style.display='block';
   document.getElementById('pics').innerHTML="Loading...";
   return false;  
}
</script>
<form action = "#" onsubmit="return searchFlickr();">
<input type='text' size='40' id='tags'>&nbsp;&nbsp;&nbsp;<input type='submit'>
</form>
<div style='border: 1px solid black; width: 100%; display: none;' id='pics'></div>
*/